<?php
	require_once 'file.php';

	class Fmgr0v0r01_app extends Fmgr0v0r01_file{

		var $media_class = 'Smuoi Application';
		
		protected $mod = 755;
		
		protected $ini;
		protected $arguments;
		
		function critical_defaults(){
			return array_merge(parent::critical_defaults(), array(
				'mod' => $this->mod,
				'mime' => 'application/x-smuoi-app'
			));	
		}
		
####	get functions

		function app_defaults(){
			return array('title'=>$this->media_class);
		}

		function name(){
			return $this->arguments()->title;
		}
		
		function icon(){
			return ($i = $this->arguments()->icon) ? $i : parent::icon();
		}
				
		function arguments(){
			if(is_null($this->arguments)){
				$this->arguments = new args($this->app_defaults());
				$this->arguments->set(parse_ini_file($this->realpath()));
			}
			return $this->arguments;
		}
		
	}

